# -*-coding:utf-8 -*-
from django.shortcuts import render
from django.db import connection
import requests
import json



# 连接 mysql 测试
def mysql_connect_test(request):
    mycursor = connection.cursor()
    mycursor.execute('  SELECT * from tb_word where complexity = 500 limit 1,22      ')
    result = mycursor.fetchall()
    myList = []
    return_data = {
        'title':' 大文本排版换行测试 ( and SQL 测试) : ',
        "myList" : json.dumps(result)
    }
    # return render(request, 'mysql/inde.html', context=return_data)

    response = render(request, 'mysql/inde.html', context=return_data)
    return response